typedef struct Node {
    int data;
    Node* next;
    Node* proir;
} DLinkList;

void Exange(DLinkList* p) {
    if (p->next == p || p->next->next == p) {
        return;
    }
    p->proir->proir->next = p;
    p->proir->next = p->next;
    p->next->proir = p->proir;
    p->next = p->proir;
    p->proir = p->next->proir;
    p->next->proir = p;
}